<?php
	if(!isset($_REQUEST['ajax'])){ $_REQUEST['ajax'] = "";}
	if($_REQUEST['ajax']!=true) include 'header.tpl.php';
?>
    <div class="row">
    	<div class="col-lg-12">
    		<ul class="shortcut-buttons-set">
				<li>
					<a class="shortcut-button" href='#salary_list'><span>
					<i class="aicon-task_list"></i>
					<?php echo $this->language['salaries'];?></span></a>
				</li>
				<li>
					<a class="shortcut-button" href='#import_salary'><span>
					<i class="aicon-import"></i>
					<?php echo $this->language['import_salary'];?></span></a>
				</li>
				<li>
					<a class="shortcut-button" href='#salary_formula'><span>
					<i class="aicon-salary_formula"></i>
					<?php echo $this->language['salary_formula'];?></span></a>
				</li>
			</ul>
    	</div>
    </div>
    <div class="row">
    	<div class="col-lg-12">
    		<div class="panel">
    			<div class="panel-heading">
    				<div class="panel-title"><i class="icon-tasks"></i> <?php echo $this->language['salary_formula'];?></div>
    			</div>
    			<div class="panel-body">
    				<form action="javascript:setFormulas();" method="post">
			            <table class="table table-hover table-condensed">
							<thead>
								<tr>
									<th width='200px'><?php echo $this->language['salary_name'];?></th>
									<th><?php echo $this->language['salary_formula'];?></th>
									<th width='120px'>&nbsp;</th>
								</tr>
							</thead>
							<tbody>
								<?php foreach($this->formulas as $row){ ?>
								<tr>
									<td><?php echo $row['sali_title'];?></td>
									<td><input type="text" class="form-control" name="formulas" id="<?php echo $row['sali_name'];?>" value="<?php echo $row['sali_formula'];?>" /></td>
									<td><font color=red><?php echo $row['sali_name'];?></font></td>
								</tr>
								<?php } ?>
							</tbody>
							<tfoot>
								<tr>
									<td></td>
									<td>
										<input type="submit" value="<?php echo $this->language['accept'];?>" class="btn btn-primary" />
										<input type="reset" value="Reset" class="btn btn-danger" />
									</td>
									<td></td>
								</tr>
							</tfoot>
						</table>
					</form>
    			</div>
    		</div>
    	</div>
    </div>
<?php if(isset($this->breadcrumb) && isset($this->title_header)):?>
	<script type="text/javascript">
		$(function() {
			$("#title-header").text('<?php echo $this->title_header;?>');
			$("#breadcrumb").html('<?php echo build_breadcrumb($this->breadcrumb);?>');
		});
	</script>
<?php endif;?>
<?php
	if($_REQUEST['ajax']!=true) include 'footer.tpl.php';
?>